import ZHCN from '@/../locales/zh/cn.json';
import i18n_ from "i18next";
import * as reactI18N from "react-i18next";

export const fallbackLng = 'zh-CN'
export const resources = {
  "zh-CN": { translation: ZHCN }
} as const;
i18n_.use(reactI18N.initReactI18next).init({
  resources,
  fallbackLng,
  interpolation: {
    escapeValue: false
  }
})

export const i18n = i18n_;
export const useTranslation = reactI18N.useTranslation;